package com.woniu.finance.schedule;

import com.woniu.finance.service.IOverdueAlarmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration
@EnableScheduling //开启定时任务
public class OverAlarmScheduleTask {

    @Autowired
    IOverdueAlarmService overdueAlarmService;

    //每天早上六点执行
    @Scheduled(cron = "0 0 6 * * ? ")
    public void AlarmTask() {
         overdueAlarmService.checkRentDeadline();
    }
}
